<? 
/*
*   this view receives:
*   $list['img_folder']
*   $list['controller']
*   $list['items'] = array ($id, $title, $text, $image)
* 
*/
              
    $i=1;
    foreach($items as $item) 
    {
        $item['text'] = strip_tags($item['text']);

?>            

    <? if (is_int(($i+2)/3)){ ?><div class="summarycontainer"><? } ?> 

    <div class="contain<? if (is_int($i/3)) echo 'right'?>">

        <? if (isset($item["image"])) { ?>
            <a href="<?=site_url($controller.$item['id'])?>">
                <img height="66" border="0" width="106" alt="" src="<?=thumbnail($img_folder.$item["image"])?>"/>
            </a>
        <? } ?>

        <? if (isset($item["date"])) { ?>
            <p class="date"><?=format_date($item["date"])?></p>
        <? } ?>

        <p>
          <strong>
            <a href="<?=site_url($controller.$item['id'])?>">
              <?=highlight($search_string, $item['title'])?>
            </a>
          </strong>
        </p>


        <p>
          <?=highlight($search_string, $item['text'], 200)?> 
          <a class="more" href="<?=site_url($controller.$item['id'])?>">more..</a>
        </p>

    </div>

    <? if ( (is_int($i/3)) || ($i==count($items)) ){ ?></div><? } ?> 

<? 
    $i++;
    }
?>  
